@page "/app1"
<h1>App 1</h1>

@Counter

<button onclick="@Greet">Click me</button>

@functions
{
    public short Counter { get; set; }

    void Greet()
    {
        Counter++;
    }
}